package com.ebeitech.camera;

import android.content.pm.ActivityInfo;
import android.graphics.PixelFormat;
import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

import com.ebeitech.doorapp.R;
import com.ebeitech.doorapp.view.BaseActivity;
import com.ebeitech.library.constant.SPConstants;

public class MediaRecorderActivity extends BaseActivity {

	public void onCreate(Bundle savedInstanceState) {
		if (savedInstanceState == null) {
			savedInstanceState = new Bundle();
		}
		savedInstanceState.putBoolean(SPConstants.IS_FIT_STATUS_BAR, false);
		super.onCreate(savedInstanceState);
		Window window = getWindow();
		window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
		window.setFormat(PixelFormat.TRANSLUCENT);
		window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

		setContentView(R.layout.ebei_activity_media);
		findViewById(R.id.view_bottom).setVisibility(View.GONE);

		MediaRecorderFragment mVideoFragment = new MediaRecorderFragment();
		FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
		ft.add(R.id.media_container, mVideoFragment);
		ft.commit();
	}

}
